﻿using System;
using System.Collections;
using System.Linq;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Xml.Linq;
using BLL;
using Model;

/// <summary>
///ClientSoftware_VersionControl_Service 的摘要说明
/// </summary>
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
//若要允许使用 ASP.NET AJAX 从脚本中调用此 Web 服务，请取消对下行的注释。 
// [System.Web.Script.Services.ScriptService]
public class ClientSoftware_VersionControl_Service : System.Web.Services.WebService
{
    private ClientSoft cs;

    public ClientSoftware_VersionControl_Service()
    {
        cs = new ClientSoft();
        //如果使用设计的组件，请取消注释以下行 
        //InitializeComponent(); 
    }

    [WebMethod]
    public string HelloWorld()
    {
        return "Hello World";
    }

    [WebMethod]
    public bool VersionCheck(string csName,string csVersion)
    {
        return !string.IsNullOrEmpty(cs.GetClientSoftbyNV(csName, csVersion).CSName) && cs.GetClientSoftbyNV(csName, csVersion).IsValid;
    }
}

